package com.gitee.wsl.mathematics.geometry.d2.contour.ext

import com.gitee.wsl.mathematics.geometry.d2.contour.ShapeContour
import com.gitee.wsl.mathematics.vector.vec2.Vec2f

/** Returns true if given [point] lies inside the [ShapeContour]. */
operator fun ShapeContour.contains(point: Vec2f): Boolean = closed && this.ring2.test(
    Vec2f(point.x, point.y)
).inside

